package com.mutouren.modules.org.dao;

import java.util.Collection;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.mutouren.common.orm.spring.BaseDao;
import com.mutouren.modules.org.model.Function;
import com.mutouren.modules.org.model.Organization;
import com.mutouren.modules.org.model.OrganizationPerson;
import com.mutouren.modules.org.model.Person;

public interface OrganizationPersonDao extends BaseDao<OrganizationPerson> {
	List<Person> searchUser(@Param("orgId")int orgId, 
			@Param("orgIdPath")String orgIdPath,
			@Param("isOnlyMainPos")boolean isOnlyMainPos, 
			@Param("isCascade")boolean isCascade, @Param("searchName")String searchName);

	List<Organization> selectPosition(@Param("personId") int personId);
	List<Function> searchFuncByOrgIds(@Param("appId")int appId, @Param("ids")Collection<Integer> ids);
	
	int setStateByPersonId(OrganizationPerson op);	
	int setState_selfAndChild(Organization org);
	int setState_mainPositionRelate(Organization org);
}
